package net.mymilkedeek.ludum.tinythumb.states;

import net.mymilkedeek.ludum.tinythumb.Game;
import org.newdawn.slick.*;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

/**
 * TODO: Write Documentation
 *
 * @author Michael Demey
 */
public class HelpState extends BasicGameState {
    @Override
    public int getID() {
        return Game.S_HELP;
    }

    @Override
    public void init(GameContainer gameContainer, StateBasedGame stateBasedGame) throws SlickException {
    }

    @Override
    public void render(GameContainer gameContainer, StateBasedGame stateBasedGame, Graphics graphics) throws SlickException {
        graphics.setColor(Color.white);
        graphics.drawString("arrows   - move", 20, 20);
        graphics.drawString("spacebar - action", 20, 40);
        graphics.drawString("p        - party menu", 20, 60);
        graphics.drawString("h        - heal 100 hp (6 uses)", 20, 80);
        graphics.drawString("b        - battle", 20, 100);
        graphics.drawString("F1       - help", 20, 120);
        graphics.drawString("Press spacebar to return", 20, 250);
    }

    @Override
    public void update(GameContainer gameContainer, StateBasedGame stateBasedGame, int i) throws SlickException {
        if ( gameContainer.getInput().isKeyPressed(Input.KEY_SPACE)) {
            stateBasedGame.enterState(Game.S_MAIN);
        }
    }
}
